package com.wsd.common.utils;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;

import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Map;
import java.util.Objects;

public class HttpUtils {
    public static String get(String url) {
        return HttpRequest.get(url).header("Content-Type", "application/json").execute().body();
    }

    public static HttpResponse post(String url, String jsonObject) {
        return HttpRequest
                .post(url)
                .body(jsonObject)
                .execute();
    }

    public static String post(String url) {
        return null;
//        return post(url, null);
    }
}
